package org.jaaksi.kottlindemo.test

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import org.jaaksi.kottlindemo.databinding.FragmentTest2Binding

class TestFragment1 : Fragment() {
    private lateinit var binding: FragmentTest2Binding

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        binding = FragmentTest2Binding.inflate(inflater, container, false)
        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        binding.button1.setOnClickListener {
            binding.view1.isVisible = !binding.view1.isVisible
        }
    }

}